import { createRouter, createWebHashHistory } from "vue-router";
import routes from './routes'

const router = createRouter({
  history: createWebHashHistory(),
  routes,
});

router.beforeEach((to, from, next) => {
  //设置标题
  to.meta?.title && (document.title = (to.meta as any).title);
  next();
});
export default router;
